893.	Compensation of employees of foreign governments or international organizations

(a)	Rule for exclusions. -- Wages, fees, or salary of any employee of a foreign government or of an international organization (including a consular or other officer, or a nondiplomatic representative), received as compensation for official services to such government or international organization shall not be included in gross income and shall be exempt from taxation under this subtitle if --

(1)	such employee is not a citizen of the United States, or is a citizen of the Republic of the Philippines (whether or not a citizen of the United States); and

(2)	in the case of an employee of a foreign government, the services are of a character similar to those performed by employees of the Government of the United States in foreign countries; and

(3)	in the case of an employee of a foreign government, the foreign government grants an equivalent exemption to employees of the Government of the United States performing similar services in such foreign country.

(b)	Certificate by Secretary of State. -- The Secretary of State shall certify to the Secretary of the Treasury the names of the foreign countries which grant an equivalent exemption to the employees of the Government of the United States performing services in such foreign countries, and the character of the services performed by employees of the Government of the United States in foreign countries.

(c)	Limitation on exclusion. -- Subsection (a) shall not apply to --

(1)	any employee of a controlled commercial entity (as defined section 892(a)(2)(B)), or

(2)	any employee of a foreign government whose services are primarily in connection with a commercial activity (whether within or outside the United States) of the foreign government.

894.	Income affected by treaty

(a)	Treaty provisions. --

(1)	In general. -- The provisions of this title shall be applied to any taxpayer with due regard to any treaty obligation of the United States which applies to such taxpayer.

(2)	Cross reference. --

For relationship between treaties and this title, see section 7852(d).

(b)	Permanent establishment in United States. -- For purposes of applying any exemption from, or reduction of, any tax provided by any treaty to which the United States is a party with respect to income which is not effectively connected with the conduct of a trade or business within the United States, a nonresident alien individual or a foreign corporation shall be deemed not to have a permanent establishment in the United States at any time during the taxable year. This subsection shall not apply in respect of the tax computed under section 877(b).

895.	Income derived by a foreign central bank of issue from obligations of the United States or from bank deposits

Income derived by a foreign central bank of issue from obligations of the United States or of any agency or instrumentality thereof (including beneficial interests, participations, and other instruments issued under section 302(c) of the Federal National Mortgage Association Charter Act (12 U.S.C. 1717)) which are owned by such foreign central bank of issue, or derived from interest on deposits with persons carrying on the banking business, shall not be included in gross income and shall be exempt from taxation under this subtitle unless such obligations or deposits are held for, or used in connection with, the conduct of commercial banking functions or other commercial activities. For purposes of the preceding sentence the Bank for International Settlements shall be treated as a foreign central bank of issue.

896.	Adjustment of tax on nationals, residents, and corporations of certain foreign countries

(a)	Imposition of more burdensome taxes by foreign country. --

Whenever the President finds that --

(1)	under the laws of any foreign country, considering the tax system of such foreign country, citizens of the United States not residents of such foreign country or domestic corporations ar ebeing subjected to more burdensome taxes, on any item of income received by such citizens or corporations from sources within such foreign country, than taxes imposed by the provisions of this subtitle on similar income derived from sources wihtin the Untied States by residents or corporations of such foreign country.

(2)	such foreign country, when requested by the United States to do so, has not acted to revise or reduce such taxes so that they are no more burdensome than taxes imposed by the provisons of this subtitle on similar income derived from sources wihtin the United States by residents or corproations if such foreign country, and

(3)	it is in the public intereste to apply pre-1967 tax provisons in accordance with the provisions of this subsection to residents or corporations of such foreign country,

the President shall proclaim that the tax on such similar income derived from sources within the United States by residents or corporatins of such foreign country shall, for taxable years beginning after such proclamation, be determined under this subtitle without regard to amendments made to this subchapter and chapter 3 on or after the date of enactment of this section.

(b)	Impositon of discriminatory taxes by foreign country. -- Whenever the President finds that --

(1)	under the laws of any foreign country, citizens of the United States or domestic corporations (or any class of such citizens or corporations) are, with respect to any item of income, being subjected to a higher effective rate of tax than are nationals, residents, or corproations of such foreign country (or a similar class of such nationals, residents, or corporations) under similar circumstances;

(2)	such foreign country, when requested by the United States to do so, has not acted to eliminate such higher effective rate of tax; and

(3)	it is in the public interest to adjust, in accordance with the provisions of this subsection, the effective rate of tax imposed by this subtitle on similar income of nationals, residents, or corporations of such foreign country (or such similar class of such nationals, residents, or corporations),

the President shall proclaim that the tax on similar income of nationals, residents, or coprorations of such foreign country (or such similar class of such nationals, residents, or corporations) shall, for taxable years begninning after such proclamation, be adjusted so as to cause the effective rate of tax imposed by this subtitle on such similar income to be substantially equal to the effective rate of tax imposed by such foreign country on such item of income of citizens of the United States or domestic corporations (or such class of citizens or corporations). In implementing a proclamation made under this subsection, the effective rate of tax imposed by this subtitle on an item of income may be adjusted by teh disallowance, in whole or in part, of any deduction, credit, or exemption which would otherwise be allowed with respect to that item of incoem or by increasing the rate of tax otherwise applicable to that item of income.

(c)	Alleviation of more burdensome or discriminatory taxes.--

Whenever the President finds that --

(1)	the laws of any foreign country with respect to which the President has made a proclamation under subsection (a) have been modified so that citizens of the United States not residents of such foreign country or domestic corporations are no longer subject to more burdensome taxes on the item of income derived by such foreign country, or

(2)	the laws of any foreign country with respect to which the President has made a proclamation under subsection (b) have been modified so that citizens of the United States or domestic corporations (or any class of such citizens or corporations) are no longer subject to a higher effective rate of tax on the item of income, he shall proclaim that the tax imposed by this subtitle on the similar income of nationals, residents, or corporations of such foreign country shall, for any taxable year beginning after such proclamation, be determined under this subtitle withou regard to such subsection.

(d)	Notification of Congress required. -- No proclamation shall be issued by the President pursuant to this section unless, at least 30 days prior to such proclamation, he has notified the Senate and the House of Representatives of his intention to issue such proclamation.

(e)	Implementation by regulations. -- The Secretary shall prescribe such regulations as he deems necessary or appropriate to implement this section.

897.	Disposition of investment in United States real property

(a)	General rule. --

(1)	Treatment as effectively connected with United States trade or business. -- For purposes of this title, gain or loss of a nonresident alien individual or a foreign corporation from the disposition of a United States real property interest shall be taken into account --

(A)	in the case of a nonresident alien individual, under section 871(B)(1),

or

(B)	in the case of a foreing corporation, under section 882(a)(1),

as if the taxpayer wre engaged in a trade or business within the United States during the taxable eyar and as if such gain or loss were effectively connected with such trade or business.

(2)	21-percent minimum tax on nonresident alien individuals. --

(A)	In general. -- In the case of any nonresident alien individual, the amount determined under section 55(b)(1)(A) shall not be less than 21 percent of the lesser of --

(i)	the individual's alternative minimum taxable income (as defined in section 55(b)(2)) for the taxable year, or

(ii)	the individual's net United Staes real property gain for the taxable year.

(B)	Net United States real property gain. -- For pruposes of subparagraph (A), the term "net United States real property gain" means the excess of --

(i)	the aggregate of the gains for the taxable year from dispositions of United States real property interests, over

(ii)	the aggregate of the losses for the taxable year from dispostions of such interests.

(b)	Limitation on losses of individuals. -- In the case of an individual, a loss shall be taken into account under subsectin (a) only to the extent such loss would be taken into account under section 165(c) (determined without regard to subsection (a) of this section).

(c)	United States real property interest. -- For purposes of this section --

(1)	United States real proeprty interest. --

(A)	In general. -- Except as provided in subparagraph (B), the term "United States real property interest" means --

(i)	an interest in real property (including an interest in a mine, well, or other natural deposit) located in the United States or the Virgin Islands, and

(ii)	any interest (other than an interest solely as a creditor) in any domestic corporation unless the taxpayer establishes (at such time and in such manner as the Secretary by regulations prescribes) that such corporation was at no time a United States real property holding corporation during the shorter of --

(I)	the period after June 18, 1980, during which the taxpayer held such interest, or

(II)	the 5-year period ending on the date of the dispositon of such interest.

(B)	Exclusion for interest in certain corporations. -- The term "United States real property interest" does not include any interest in a corporation if --

(i)	as of the date of te dispostion of such interest, such corporation did not hold any United States real property interest, and

(ii)	all of the United States real property interests held by such corporation at any time during the shorter of the periods described in subparagraph (A)(ii) --

(I)	were disposed of in transactions in which the full amount of the gain (if any) was recognized, or

(II)	ceased to be United States real property interests by reason of the application of this subparagraph to 1 or more other corporations.

(2)	United States real property holding corporation. -- The term "United States real property holding corporation" means any corporation if --

(A)	the fair market value of its United States real property interests equals or exceeds 50 percent of

(B)	the fair market value of --

(i)	its United States real property interests,

(ii)	its interests real property located outside the United States, plus

(iii) any other of its assets which are used or held for use in a trade or business.

(3)	Exception for stock regularly traded on established securities markets. -- If any class of stock of a corporation is regularly traded on an established securities market, stock of such class shall be treated as a United States real property intrest only in the case of a person who, at some time during the shorter of the periods described in paragraph (1)(A)(ii), held more than 5 percent of such class of stock.

(4)	Interests held by foreign corporations and by partnerships, trusts, and estates. -- For purposes of determining whether any corporation is a United States real property holding corporation --

(A)	Foreign corporations. -- Paragraph (1)(A)(ii) shall be applied by substituting "any corporation (whether foreign or domestic)" for "any domestic corporation".

(B)	Assets held by partnerships, etc. -- Under regulations prescribed by the Secretary, assets held by a partnership, trust, or estate shall be treated as held proportionately by its partners or beneficiaries. Any asset treated as held by a partner or beneficiary by reason of this subparagraph which is used or held for use by the partnership, trust, or estate in a trade or business shall be treated as so used or held by the partner or beneficiary. As asset treated as held by a partner or beneficiary. Any asset treated as held by a partner or beneficiary by reason of this subparagraph shall be so treated for purposes of applying this subparagraph successively to partnerships, trusts, or estates which are above the first partnership, trust, or estate in a chain thereof.

(5)	Treatment of controlling interests. --

(A)	In general. -- Under regulatios, for purposes of determining whether any corporation is a United States real property holding corporation, if any corporation (hereinafter in this paragraph referred to as the "first corporation") holds a controlling interest in a second corporation --

(i)	the stock which the first corporation holds in the second corporation shall not be taken into account,

(ii)	the first corporation shall be treated as holding a portion of each asset of the second corporation equal to the percentage of the fair market value of the stock of the second corporation represented by the stock held by the first corporation, and

Any asset treated as held by the first corporation by reason of the preceding sentence shall be so treated for purposes of applying the preceding sentence successively to corporations which are above the first corporation in a chain of corporations.

(iii) any asset treated as held by the first corporation by reason of claue (ii) which is used or held for use by the second corporation in a trade or business shall be treated as so used or held by the first corporation.

(B)	Controlling interest. -- For purposes of subparagraph (A), the term "controlling interest" means 50 percent or more of the fair market value of all classes of stock of a corporation.

(6)	Other special rules. --

(A)	Interest in real property. -- The term "interest in real property includes fee ownership and co-ownership of land or impprovements thereon, leaseholds of land or improvements thereon, options to acquire land or improvements thereon, and options to acquire leaseholds of land or improvements thereon.

(B)	Real property includes associated personal property. -- The term "real property" includes movable walls, furnishings, and other personal property associated with the use of the real property.

(C)	Constructive ownership rules. -- For purposes of determining under paragraph (3) whether any person holds more than 5 percent of any class of stock and of determining under paragraph (5) whethr a person holds a controlling interest in any corporation, section 318(a) shall apply (except that paragraphs (2)(C) and (3)(C) of section 318(a) shall be applied by substituting "5 percent" for "50 percent").

(d)	Treatment of distributions by foreign corporations. --

(1)	In general. Except to the extent otherwise provided in regulations, notwithstanding any other provision of this chapter, gain shall be recognized by a foreign corporation on the distribution (including a distribution in liquidation or redemption) of a United States real property interest in an amount equal to the excess of the fair market value of such interest (as of the time of the distribution) over its adjusted basis.

(2)	Exceptions. -- Gain shall not be recognized under paragraph (1) --

(A)	if --

(i)	at the time of the receipt of the distributed property, the distributee would be subject to taxation under this chapter on a subsequent disposition of the distributed property, and

(ii)	the basis of the distribued property in the hands of the distributee is no greater than the adjusted basis of such property before the distribution, increased by the amount of gain(if any) recognized by the distributing corporation, or

(B)	if such nonrecognition is provided in regulations prescribed by the Secretary under subsection (e)(2).

(e)	Coordination with nonrecognition provisions. --

(1)	In general. -- Except to the extent otherwise provided in subsection (d) and paragraph (2) of this subsection, any nonrecognition provision shall apply for purposes of this section to a transaction only in the case of an exchange of a United States real property interest for an interest the sale of which would be subject to taxation under this chapter.

(2)	Regulations. -- The Secretary shall prescribe regulations (which are necessary or appropriate to prevent the avoidance of Federal incomes taxes) providing --

(A)	the extent to which nonrecognition provisions shall, and shall not, apply for purposes of this section, and

(B)	the extent to which --

(i)	transfers of property in reorganization, and

(ii)	changes in interests in, or distributions from, a partnership, trust, or estate,

shall be treated as sales of property at fair market value.

(3)	Nonrecognition provision defined. -- For purposes of this subsection, the term "nonrecognition provision" means any provision of this title for not recognizing gain or loss.

(f)	Distributions by domestic corporations to foreign shareholders. -- If a domestic corporation distributes a United States real property interest to a nonresident alien individual or a foreign corproation in a distribution to which section 301 applies, notwithstanding any other provision of this chapter, the basis of such United States real property interest in the hands of such nonresident alien individual or foreign corporation shall not exceed --

(1)	the adjusted basis of such property before the distribution, increased by

(2)	the sum of --

(A)	any gain recognized by the distributing corporation on the distribution, and

(B)	any tax paid under this chapter by the distributee on such distribution.

(g)	Special rule for sales of interest in partnerships, trusts, and estates. -- Under regulations prescribed by the Secretary, the amount of any money, and the fair market value of any property, received by a nonresident alien individual or foreign corporation in exchange for all or part of its interest in a partnership, trust, or estate shall, to the extent attributable to United States real property interests, be considered as an amount received from the sale or exchange in the United States of such property.

(h)	Special rules for REITS. -- For purposes of this section --

(1)	Look-through of distributions. -- Any distribution by a REIT to a nonresident alien individual or a foreign corporation shall, to the extent attributable to gain from sales or exchanges by the REIT of United States real property interests, be treated as gain recognized by such nonresident alien individual or foreign corporation from the sale or exchange of a United States real property interest.

(2)	Sale of stock in domestically-controlled REITS. -- In the case of a domestically-controlled REIT, rules similar to the rules of subsection (d) shall apply to the foreign ownership percentage of any gain.

(4)	Definitions. --

(A)	REIT. -- The term "REIT" means a real estate investment trust.

(B)	Domestically-controlled REIT. -- The term "domestically-controlled REIT" MEANS A reit in which at all times during the testing period less than 50 percent in value of the stock was held directly or indirectly by foreign persons.

(C)	Foreign ownership percentage. -- The term "foreign ownership percentage" means that percentage of the stock of the REIT which was held (directly or indirectly) by foreign persons at the time during the testing period during which the direct and indirect ownership of stock by foreign persons was greatest.

(D)	Testing period. -- The term "testing period" means whichever of the following periods is th shortest:

(i)	the period beginning on June 19, 1980, and ending on the date of the disposition or of the distribution, as the case may be,

(ii)	the 5-year period ending on the date of the disposition or of the distribution, as the case may be, or

(iii) the period during which the REIT was in existence.

(i)	Election by foreign corporation to be treated as domestic corporation. --

(1)	In general. -- If --

(A)	a foreign corporation holds a United States real property interest, and

(B)	under any treaty obligation of the United States the foreign corporation is entitled to nondiscriminatory treatment with respect to that interest,

then such foreign corporation may make an election to be treated as a domestic corporation for purposes of this section, section 1445, and section 6039C.

(2)	Revocation only with consent. -- Any election under paragraph (1), once made, may be revoked only with the consent of the Secretary.

(3)	Making of election. -- An election under paragraph (1) may be made only --

(A)	if all of the owners of all classes of interests (other than interests solely as a creditor) in the foreign corporation at the time of the election consent to the making of the election and agree that gain, if any, from the dispostion of such interest after June 18, 1980, which would be taken into account under subsection (a) shall be taxable notwithstanding any provision to the contrary in a treaty to which the United States is a party, and

(B)	subject to such other conditions as the Secretary may prescribe by regulations with respect to the corporation or its shareholders.

In the case of a class of interest (other than an interest solely as a creditor which is regularly traded on an established securities market, the consent described in subparagraph (A) need only be made by any person if such person held more than 5 percent of such class of interest at some time during the shorter of the periods described in subsection (c)(1)(A)(ii). The constructive ownership rules of subsection (c)(6)(C) shall apply in determining whether a person held more than 5 percent of a class of interest.

(4)	Exclusive method of claiming nondiscrimination. -- The election provided by paragraph (1) shall be the exclusive remedy for any person claiming discriminatory treatment with respect to this section, section 1445, and section 6039C.

(j)	Certain contributions to capital. -- Except to the extent otherwise provided in regulations, gain shall be recognized by a nonresident alien individual or foreign corporation on the transfer of a United States real property interest to a foreign corporation if the transfer is made as paid in surplus or as a contribution to capital, in the amount of the excess of --

(1)	the fair market value of such property transferred, over

(2)	the sum of --

(A)	the adjusted basis of such property in the hands of the transferor, plus

(B)	the amount of gain, if any, recognized to the transferor under any other provision at the time of the transfer.

(k)	Repealed.

(l)	Repealed.

898.	Taxable year of certain foreign corporations

(a)	General Rule. For purposes of this title, the taxable year of any specified foreign corporation shall be the required year determined under subsection (c).

(b)	Specified Foreign Corporation. -- For purposes of this section --

(1)	In general. -- The term "specivied foreign corporation" means any foreign corporation --

(A)	which is --

(i)	treated as a controlled foreign corporation for any purpose under subpart F of part III of this subchapter, or

(ii)	a foreign personal holding company (as defined in section 552), and

(B)	with respect to which the ownership requirements of paragraph (2) are met.

(2)	Ownership requirements. --

(A)	In general. -- The ownership requirements of this paragraph are met with respect to any foreign corporation if a United States shareholder owns, on each testing day, more than 50 percent of --

(i)	the total voting power of all classes of stock of such corporation entitled to vote, or

(ii)	the total value of all classes of stock of such corporation.

(B)	Ownership. -- For purposes of subparagraph (A), the rules of subsections (a) and (b) of section 958 and sections 551(f) and 554, whichever are applicable, shall apply in determining ownership.

(3)	United States shareholder. --

(A)	In general. -- The term "United States shareholder" has the menaing given to such term by section 951(b), except that, in the case of a foreign corporation having related person insurance income (as defined in section 953(c)(2)), the Secretary may treat any person as a United States shareholder for purposes of this section if such person is treated as a United States shareholder under secion 953(c)(1).

(B)	Foreign personal holding companies. -- In the case of any foreign personal holding company (as defined in section 552) which is not a specified foreign corporation by reason of paragraph (1)(A)(i), the term "United States shareholder" means any person who is treated as a United States shareholder under section 551.

(c)	Determination of Required Yar. --

(1)	Controlled foreign corporations. --

(A)	In general. -- In the case of a specified foreign corporation described in subsection (b)(1)(A)(i), the required year is --

(i)	the majority U.S. shareholder year, or

(ii)	if there is no majority U.S. shareholder year, the taxable year prescribed under regulations.

(B)	1-month deferral allowed. -- A specified foreign corporation may elect, in lieu of the taxable year under subparagraph (A)(i), a taxable year beginning 1 month earlier than the majority U.S. shareholder year.

(C)	Majority U.S. shareholder year. --

(i)	In general. -- For purposes of this subsection, the term "majority U.S. shareholder year" means the taxable year (if any) which, on each testing day, constituted the taxable year of --

(I)	each United States shareholder described in subsection (b)(2)(a), and

(II)	each United States shareholder not described in subclause (I) whose stock was treated as owned under subsection (b)(2)(B) by any shareholder described in such subclause.

(ii)	Testing day. -- The testing days shall be --

(I)	the first day of the corporation's taxable year (determined without regard to this section), or

(II)	the days during such representative period as the Secretary may prescribe.

(2)	Foreign personal holding companies. -- In the case of a foreign personal holding company described in subsectin (b)(3)(B), the required year shall be determined under paragraph (1), except that subparagraph (B) of paragraph (1) shall not apply.

901.	Taxes of foreign countries and of possessions of United States

(a)	Allowance of credit. -- If the taxpayer chooses to have the benefits of this subpart, the tax imposed by this chapter shall, subject to the limitation of section 904, be credited with the amounts provided in the applicable paragraph of subsection (b) plus, in the case of a corporation, the taxes deemed to have been paid under sections 902 and 960. Such choice for any taxable year may be made or changed at any time before the expiration of the period prescribed for making a claim for credit or refund of the tax imposed by this chapter for such taxable year. The credit shall not be allowed against any tax treated as a tax not imposed by this chapter under section 26(b).

(b)	Amount allowed. -- Subject to the limitation of section 904, the following amounts shall be allowed as the credit under subsection (a):

(1)	Citizens and domestic corporations. -- In the case of a citizen of the United States and of a domestic corporation, the amount of any income, was profits, and excess profits taxes paid or accrued during the taxable year to any foreign country or to any possession of the United States; and

(2)	Resident of the United States or Puerto Rico. -- In the case of a resident of the United States and in the case of an indivdual who is a bona fide resident of Puerto Rico during the entire taxable year, the amount of any such taxes paid or accrued during the taxable year to any possession of the United States; and

(3)	Alien resident of the United States or Puerto Rico. -- In the case of an alien resident of the United States and in the case of an alien individual who is a bona fide resident of Puerto Rico during the entire taxable year, the amount of any such taxes paid or accrued during the taxable year to any foreign country; and

(4)	Nonresident alien individuals and foreign corporations. -- In the case of any nonresident alien individual not described in section 876 and in the case of any foreign corporation, the amount determined pursuant to section 906; and

(5)	Partnerships and estates. -- In the case of any individual described in paragraph (1), (2), (3), or (4), who is a member of a partnership or a beneficiary of an estate or trust, the amount of his proportionate share of the taxes (described in such paragraph) of the partnership or the estate or trust paid or accrued during the taxable year to a foreign country or to any possession of the United States, as the cases may be.

(c)	Similar credit required for certain alien residents. Whenever the President finds that --

(1)	a foreign country, in imposing income, was profits, and excess profits taxes, does not allow to citizens of the United States residing in such foreign country a credit for any such taxes paid or accrued to the United States or any foreign country, as the cas may be, similar to the credit allowed under subsection (b)(3),

(2)	such foreign country, when requested by the United States to do so, has not acted to provide such a similar credit to citizens of the United States residing in such foreign country, and

(3)	it is in the public interest to allow the credit under subsection (b)(3) to citizens or subjects of such foreign country only if it allows such a similar credit to citizens of the United States residing in such foreign country,

the President shall proclaim that, for taxable years beginning while the proclamation remains in effect, the credit under subsection (b)(3) shall be allowed to citizens or subjects of such foreign country only if such foreign country, in imposing income, war profits, and excess profits taxes, allows to citizens of the United States residing in such foreign country such a similar credit.

(d)	Treatment of dividends from a DISC or former DISC. -- For purposes of this subpart, dividends from a DISC or former DISC (as defined in section 992(a)) shall be treated as dividends from a foreign corporation to the extent such dividends are treated under part I as income from sources without the United States.

(e)	Foreign taxed on mineral income. --

(1)	Reduction in amount allowed. -- Notwithstanding subsection (b), the amount of any income, war profits, and excess profits taxes paid or accrued during the taxable eyar to any foreign country or possession of the United States with respect to foreign mineral income from sources within such country or possession which would (but for this paragraph) be allowed under such subsection shall be reduced by the amount (if any) by which --

(A)	the amount of such taxes (or, if smaller, the amount of the tax which would be computed under this chpater with respect to such income determined without the deduction allowed under section 613), exceeds

(B)	the amount of the tax computed under this chapter with respect to such income.

(2)	Foreign mineral income defined. -- For purposes of paragraph (1), the term "foreign mineral income" means income derived from the extraction of minerals from mines, wells, or other natural deposits, the processing of such minerals into their primary products, and the transportation, distribution, or sale of such minerals or primary products. Such term includes, but is not limited to --

(A)	dividends received from a foreign corporation in respect of which taxes are deemed paid by the taxpayer under section 902, to the extent such dividends are attributable to foreign mineral income, and

(B)	that portion of the taxpayer's distributive share of the income of partnerships attributable to foreign mineral income.

(f)	Certain payments for oil or gas not considered as taxes. -- Notwithstanding subsection (b) and sections 902 and 960, the amount of any income, or profits, and excess profits taxes paid or accrued during the taxable year to any foreign country in connection with the purchase and sale of oil or gas extracted in such country is not to be considered as tax for purposes of section 275(a) and this section if --

(1)	the taxpayer has no economic interest in the oil or gas to which section 611(a) applies, and

(2)	either such purchase or sale is at a price which differs from the fair market value for such oil or gas at the time of such purchase or sale.

(g)	Certain taxes paid with respect to distributions from possessions corporatins. --

(1)	In general. -- For purposes of this chapter, any tax of a foreign country or possession of the United States which is paid or accrued with respect to any distribution from a corporation --

(A)	to the extent that such distribution is attributable to periods during which such corporation is a possessions corporation, and

(B)(i) if a dividends received deduction is allowable with respect to such distribution under part VIII of subchapter B, or

(ii)	to the extent that such distribution is received in connection with a liquidation or other transaction with respect to which gain or loss is not recognized,

shall not be treated as income, was profits, or excess profits taxes paid or accrued to a foreign country or possession of the United States, and no deduciton shall be allowed under this title with respect to any amount so paid or accrued.

(2)	Possessions corporation. -- For purposes of paragraph (1), a corporation shall be treated as a possessions corproatin for any period during which an election under section 936 applied to such corporation, during which section 931 (as in effect on the day befoe the date of the enactment of the Tax Reform Act of 1976) applied to such corporation, or during which section 957(c)(as in effect on the day before the date of the enactment of the Tax Reform Act of 1986) applied to such corporation.

(h)	Taxes paid with respect to foreign trade income. -- No credit shall be allowed under this section for any income, war profits, and excess profits taxes paid or accrued with respect to the foreign trade income (within the meaning of sectin 923(b)) of a FSC, other than section 923(a)(2) non-exempt income (within the meaning of sectin 927(d)(6)).

(i)	Taxes used to provide subsidies. -- Any income, war profits, or excess profits tax ahll not be treated as a tax for purposes of this title to the extent --

(1)	the amount of such tax is used (directly or indirectly) by the country imnposing such tax to provide a subsidy by any means to the taxpayer, a related person (wihtin the meaning of section 482), or any party to the transaction or to a related transaciton, and

(2)	such subsidy is determined (directly or indirectly) by reference to the amount of such tax, or the base used to compute the amount of such tax.

(j)	Denial of foreign tax credit, etc., with respect to certain foreign countries. --

(1)	In general. -- Notwithstanding any other provision of this part --

(A)	no credit shall be allowed under subsection (a) for any income, war profits, or excess profits taxes paid or accreud (or deemed paid under section 902 or 960) to any country if such taxes are with respect to income attributable to a period during which this subsection applies to such country, and

(B)	subsections (a), (b) and (c) of section 904 and sections 902 and 960 shall be applied separately with respect to income attributable to such a period from sources within such country.

(2)	Countries to which subsection applies. --

(A)	In general. -- This subsection shall apply to any foreign country --

(i)	the government of which the United States does not recognize, unless such governmetn is otherwise elgible to purchase defense articles or services under the Arms Export Control Act,

(ii)	with respect to which the United States has severed diplomatic relations,

(iii) with respect to which the United States has not severed diplomatic realtions but does not conduct such relations, or

(iv)	which the Secretary of State has, pursuant to section 6(j) of the Export Administration Act of 1979, as amended, designated as a foreign country which repeatedly provides support for acts of international terrorisms.

(B)	Period for which subsection applies. -- This subsection shall apply to any foreign country described in subparagraph (A) during the period --

(i)	beginning on the later of --

(I)	January 1, 1987, or

(II) 6 months after such country becomes a country described in subparagraph (A), and

(ii)	ending on the date the Secretary of State certifies to the Secretary of the Treasury that such country is no longer described in subparagraph (A).

(C)	Special rule for South Africa. --

(i)	In general. -- In addition to any period during which this subsection would otherwise apply to South Afirca, this subsection shall apply to South Africa during the period --

(I)	beginning on January 1, 1988, and

(II)	ending on the date the Secretary of Sate certifies to the Secretary of the Treasury that South Africa meets the requirements of section 311(a) of the Comprehensive Anti-Apartheid Act of 1986 (as in effect on the date of te enactment of this subparagraph).

(ii)	South Africa defined. -- For purposes of clause (i), the term "South Africa" has the meaning given to such term by paragraph (6) of section 3 of the Comprehensive Anti-Apartheid Act of 1986 (as so in effect).

(3)	Taxes allowed as a deduction, etc. -- Sections 275 and 78 shall not apply to any tax which is not allowable as a credit under subsection (a) by reason of this subsection.

(4)	Regulations. -- The Secretary shall prescribe such regulations as may be necessary or appropriate to carry out the purposes of this subsection, including regulations which treat income paid through 1 or more netities as derived from a foreign country to which this subsection applies if such income was, without regard to such entities, derived from such country.

(k)	Cross reference. --

(1)	For deductions of income, war profits, and excess profits taxes paid to a foreign country or a possession of the United States, see sections 164 and 275.

(2)	For right of each partner to make election under this section, see section 703(b).

(3)	For right of estate or trust to the credit for taxes imposed by foreign countries and possessions of the United Stats under this section, see section 642(a).

(4)	For reduction of credit for failure of a United States person to furnish certain information with respect to a foreign corporation controlled by him, see section 6038.

902.	Deemed paid credit where domestic corporation owns 10 percent or more of voting stock of foreign corporation

(a)	Taxes paid by foreign corproation treated as paid by domestic corporation. -- For purposes of this subpart, a domestic corporation which owns 10 percent or more of the voting stock of a foreign corporation from which it receives dividends in any taxable year shall be deemed to have paid the same proportion of such foreign corporation's post-1986 foreign incomes taxes as --

(1)	the amount of such dividends (determined without regard to section 78), bears to

(2)	such foreign corporation's post -1986 undistributed earnings.

(b)	Deemed taxes increased in case of certain 2nd and 3rd tier foreign corporations. --

(1)	2nd tier. -- If the foreign corporation described in subsection (a) (hereinafter in this section referred to as the "1st tier corporation") owns 10 percent or more of the voting stock of a 2nd foreign corporation from which it receives dividends in any taxable year, the 1st tier corporation shall be deemed to have paid the same proportion of such 2nd foreign corporation's post-1986 foreign income taxes as would be determined under subsection (a) if such 1st tier corporation were a domestic corporation.

(2)	3rd tier. -- If such 1st tier corporation owns 10 percent or more of the voting stock of a 2nd foreign corporation which, in turn, owns 10 percent or more of the voting stock of a 3rd foreign corporation from which the 2nd corporation received dividends in any taxable year, such 2nd foreign corporation shall be deemed to have paid the same proportion of such 3rd foreign corporation's post-1986 foreign income taxes as would be determined under subsection (a) if such 2nd foreign corporation were a domestic corporation.

(3)	5 percent stock requirement. -- For purposes of this subject --

(A)	For 2nd tier. -- Paragraph (1) shall not apply unless the percentage of voting stock owned by the domestic corporation in the 1st tier corporation and the percentage of voting stock owned by the 1st tier corporation in the 2nd foreign corporation when multiplied together equal at least 5 percent.

(B)	For 3rd iter. -- Paragraph (2) shall not apply unless the percentage arrived at for purposes of applying paragraph (1) when multiplied by the percentage of voting stock owned by the 2nd foreign corporation in the 3rd foreign corporation is equal to at least 5 percent.

(c)	Definitions and special rules. -- For purposes of this section --

(1)	Post-1986 undistributed earnings. -- The term "post-1986 foreign corporation (computed in accordance with section 964(a) and 986) accumulated in taxable years beginning after December 31, 1986 --

(A)	as of the close of the taxable year of the foreign corporation in which the dividend is distribued, and

(B)	without diminution by reason of dividends distribued during such taxable year.

(2)	Post-1986 foreign income taxes. -- The term "post-1986 foreign income taxes" means the sum of --

(A)	the foreign income taxes with respect to the taxable year of the foreign corporation in which the dividend is distributed, and

(B)	the foreign income taxes with respect to prior taxable years beginning after December 31, 1986, to the extent such foreign taxes were not deemed paid with respect to dividends distribued by the foreign corporation in prior taxable years.

(3)	Special rule whre domestic corporation acquires 10 percent of foreign corporation after December 31, 1986. --

(A)	In general. -- If the 1st day on which the ownership requirements of subparagraph (b) are met with respect to any foreign corporation is in a taxable year of such corporation beginning after December 31, 1986, the post-1986 undistributed earnings and the post-1986 foreign income taxes of such foreign corporation shall be determined by taking into account only periods beginning on and after the 1st day of the 1st taxable year in which such ownership requiremetns are met.

(B)	Ownership requirements. -- The ownership requirements of this subparagraph are met with respect to any foreign corporation if --

(i)	10 percent or more of the voting stock of such foreign corporation is owned by a domestic corporation,

(ii)	the requirements of subsection (b)(3)(A) are met withr espect to such foreign corporation and 10 percent or more of the voting stock of such foreign corporation is owned by another foreign corporation described in clause (i), or

(iii) the requirements of subsection (b)(3)(B) are met with respect to such foreign corporation and 10 percent or more of the voting stock of such foreing corporation is owned by another foreign corporation described in clause (ii).

(4)	Foreign income taxes. --

(A)	In general. -- The term "foreign income taxes" means any income, war profits, or excess profits taxes paid by the foreign corporation to any foreign country or possession of the United States.

(B)	Treatment of deemed taxes. -- Except for purposes of determining the amount of the post-1986 foreign income taxes of a 3rd foreign corporation referrred to in subsection (b)(2), the term "foreign income taxes" includes any such taxed deemed to be paid by the foreing corporation under this section.

(5)	Accounting periods. -- In the case of a foreign corproation the income, war profits, and excess profits taxes of whcih are determined on the basis of an accounting period of less than 1 year, the word "year" as used in this subsection shall be construed to mean such accounting period.

(6)	Treatment of distributions from earnings before 1987. --

(A)	In general. -- In the case of any dividend paid by a foreign corporation out of accumulated profits (as defined in this section as in effect on the day before the date of the enactment of the Tax Reform Act of 1986) for taxable years beginning before the 1st taxable year taken into account in determining the post-1986 undistributed earnings of such corporation --

(i)	this section (as amended by the Tax Refort Act of 1986) shall not apply, but

(ii)	this section (as in effect on the day before the date of the enactment of such Act) shall apply.

(B)	Dividends paid first out of post-1986 earnings. -- Any dividend in a taxable year beginning after December 31, 1986, shall be treated as made out of post-1986 undistribued earnings to the extent thereof.

(7)	Regulations. -- The Secretary shall provide such regulations as may be necessary or appropriate to arry out the provisions of this section and section 960, including provisions which provide for the separate appliation of this section and section 960 to reflect the separate applciation of section 904 to separate types of income and loss.

(d)	Cross references. --

(1)	For inclusion in gross income of an amount equal to taxes deemed paid under subsection (a), see section 78.

(2)	For application of subsections (a) and (b) with respect to taxes deemed paid in a prior taxalbe year by a United States shareholder with respect to a controlled foreign corporation, see section 960.

(3)	For reduction of credit with respect to dividends paid out of post-1986 undistributed earnings for years for which certain information is not furnished, see section 6038.